A distributed ledger is a database that is stored on multiple different data processing systems and that can be updated by multiple different data processing systems. A distributed ledger may provide a digital record of financial transactions and asset ownership, for instance. Structurally, a distributed ledger may contain multiple block records, and each block record may include multiple transaction records, for example. A transaction record may document a set of one or more financial transactions, for instance. For brevity, block records may be referred to as “blocks,” and transaction records may be referred to as “transactions.” The data processing systems which interact with the distributed ledger may be referred to as “nodes.” For a distributed ledger, multiple different nodes may add new blocks of transactions to the ledger.
If a distributed ledger follows a predetermined standard or protocol which requires each new block to include a link to the previous block, the distributed ledger may be referred to as a “blockchain.” In a typical blockchain, each block is a data structure that includes a payload of transactions, along with a header that contains the link to the previous block. (However, the link to the previous block may be omitted from the initial block, which may also be referred to as the “genesis block”). The block header may also include a hash value for the payload and a proof of work (POW), possibly along with other hash values or other types of data, such as a hash of the previous block.
Also, each transaction may be timestamped and digitally signed by the node which created it. For purposes of this disclosure, a node that creates a transaction for a distributed ledger may be referred to as a “transactor.” A transaction may document a transfer of funds from an account of one transactor to an account of a second transactor, for example. After a transactor creates a transaction, the transactor may send the transaction to other nodes via the Internet, the “cloud,” or any other suitable connection. A node called a “miner” may collect such transactions, validate them, and save them as part of a new block. The miner may then publish that new block to other nodes. For purposes of this disclosure, a node that creates a new block for a distributed ledger may also be referred to as a “validator.” As described in greater detail below, validators may also validate new blocks from other validators.
The nodes which cooperate to maintain and build a particular distributed ledger may be referred to as a “distributed ledger system” (DLS). A DLS may maintain a blockchain without any central authority. Instead, the nodes may use processing resources to perform validation and other functions (e.g., generating POWs), and the nodes may cooperate to ensure universal or consensus agreement on the state of the ledger.
A distributed ledger may include all valid transactions that have ever been created. Accordingly, the distributed ledger may contain a set of blocks that is continuously growing. And each validator in a DLS may include a copy of the entire ledger. In addition, each validator may maintain local state data based on information from the transactions. For instance, each validator may keep a running total of all account balances, to be used for validating new transactions (e.g., to check for sufficient funds in an account to be debited by a new transaction).
Consequently, distributed ledgers have inherent scalability issues. When all of the validators in a DLS must have a copy of all transactions, all of the transactions must be broadcast to all of the validators. These broadcasted transactions create a very large number of network messages, on the order of (a) the number of validators in the DLS times (b) the number of transactions. Furthermore, at least one validator must then assemble a group of valid transactions into a block and broadcast that block to all other validators. Such broadcasted blocks also create a large number of network messages. And when each validator must permanently store all transactions, the DLS can impose significant storage requirements. Consequently, a DLS may not scale well due to factors such as the number of messages and the number of transactions.
The present disclosure describes methods and apparatus to facilitate secure partitioning and updating of distributed ledgers. A DLS that uses secure partitioning according to the present teachings may avoid some or all of the scaling issues experienced by other types of DLSs, with regard to the number of messages sent, and with regard to the number of transactions stored by a typical validator.